:root {
  --primary-color: #2c3e50;
  --secondary-color: #3498db;
  --accent-color: #e74c3c;
  --light-gray: #f5f7fa;
  --medium-gray: #e0e6ed;
  --dark-gray: #7f8c8d;
  --border-radius: 8px;
  --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  --transition: all 0.3s ease;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background-color: #f0f2f5;
  margin: 0;
  padding: 20px;
  color: var(--primary-color);
}

.container {
  max-width: 800px;
  margin: 0 auto;
  background: white;
  border-radius: 12px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

/* 通用样式 */
.section-title {
  font-size: 1.5rem;
  margin: 0;
  font-weight: 600;
}

.subtitle {
  font-size: 1.2rem;
  margin: 0 0 15px 0;
  font-weight: 600;
  color: var(--primary-color);
}

.divider {
  height: 1px;
  background-color: var(--medium-gray);
  margin: 20px 0;
}

/* 文件区域 */
.file-section {
  padding: 20px;
  background-color: var(--light-gray);
  border-bottom: 1px solid var(--medium-gray);
}

.file-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.file-path {
  font-size: 1rem;
  color: var(--dark-gray);
}

.untitled {
  color: var(--secondary-color);
  font-weight: 500;
}

/* 模板区域 */
.template-section {
  padding: 20px;
}

.template-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
}

.reset-btn {
  background-color: white;
  border: 1px solid var(--medium-gray);
  border-radius: var(--border-radius);
  padding: 6px 12px;
  font-size: 0.9rem;
  cursor: pointer;
  transition: var(--transition);
}

.reset-btn:hover {
  background-color: var(--light-gray);
}

.categories {
  background-color: var(--light-gray);
  border-radius: var(--border-radius);
  padding: 15px;
}

.category-title {
  font-size: 1rem;
  margin: 0 0 10px 0;
  font-weight: 500;
  color: var(--dark-gray);
}

.category-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.category-item {
  padding: 10px 15px;
  border-radius: var(--border-radius);
  margin-bottom: 8px;
  cursor: pointer;
  transition: var(--transition);
}

.category-item:hover {
  background-color: var(--medium-gray);
}

.category-item.active {
  background-color: var(--secondary-color);
  color: white;
  font-weight: 500;
}

/* 编程区域 */
.programming-section {
  padding: 20px;
  text-align: center;
  background: linear-gradient(135deg, #6a11cb 0%, #2575fc 100%);
  color: white;
  margin: 0 20px;
  border-radius: var(--border-radius);
}

.programming-title {
  font-size: 2rem;
  margin: 10px 0;
  font-weight: 700;
}

.programming-subtitle {
  font-size: 1.3rem;
  margin: 10px 0;
  font-weight: 500;
}

/* 分享区域 */
.share-section {
  padding: 20px;
}

.share-options {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}

.share-btn {
  background-color: white;
  border: 1px solid var(--medium-gray);
  border-radius: var(--border-radius);
  padding: 10px 20px;
  font-size: 1rem;
  cursor: pointer;
  transition: var(--transition);
  min-width: 100px;
}

.share-btn:hover {
  background-color: var(--light-gray);
}

.size-option {
  display: flex;
  align-items: center;
  background-color: var(--light-gray);
  border-radius: var(--border-radius);
  padding: 15px;
  flex: 1;
}

.size-label {
  font-weight: 500;
  margin-right: 15px;
  min-width: 50px;
}

.size-details {
  flex: 1;
}

.dimensions {
  margin: 0 0 8px 0;
  font-size: 0.95rem;
}

.size-controls {
  display: flex;
  gap: 10px;
}

.size-btn {
  background-color: white;
  border: 1px solid var(--medium-gray);
  border-radius: var(--border-radius);
  padding: 6px 12px;
  font-size: 0.9rem;
  cursor: pointer;
  transition: var(--transition);
}

.size-btn:hover {
  background-color: var(--medium-gray);
}

/* 背景区域 */
.background-section, .bg-color-section {
  padding: 0 20px 20px 20px;
}

.bg-controls {
  display: flex;
  gap: 15px;
}

.bg-btn {
  background-color: white;
  border: 1px solid var(--medium-gray);
  border-radius: var(--border-radius);
  padding: 10px 20px;
  font-size: 1rem;
  cursor: pointer;
  transition: var(--transition);
  flex: 1;
}

.bg-btn:hover {
  background-color: var(--light-gray);
}

/* 背景色控制 */
.opacity-control {
  display: flex;
  align-items: center;
  background-color: var(--light-gray);
  border-radius: var(--border-radius);
  padding: 15px;
}

.opacity-label {
  font-weight: 500;
  margin-right: 15px;
  min-width: 80px;
}

.slider-container {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 15px;
}

.opacity-slider {
  flex: 1;
  height: 6px;
  border-radius: 3px;
  background: linear-gradient(to right, #e0e0e0, #3498db);
  outline: none;
  -webkit-appearance: none;
}

.opacity-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--secondary-color);
  cursor: pointer;
}

.opacity-value {
  min-width: 40px;
  text-align: right;
  font-weight: 500;
}